// mock数据模拟
import Mock from 'mockjs'

// 图表数据
let List = []
export default {
    getStatisticalData: () => {
        // Mock.Random.float 产生随机数100到8000之间 保留小数 最小0位 最大0位
        for(let i = 0; i < 7; i++) {
            List.push(
                Mock.mock({
                    面膜: Mock.Random.float(100,8000,0,0),
                    精华: Mock.Random.float(100,8000,0,0),
                    眼霜: Mock.Random.float(100,8000,0,0),
                    口红: Mock.Random.float(100,8000,0,0),
                    面霜: Mock.Random.float(100,8000,0,0),
                    爽肤水: Mock.Random.float(100,8000,0,0)
                })
            )
        }
        return {
            code: 20000,
            data: {
                // 拼图
                videoData: [
                    {
                        name: '面膜',
                        value: 2999
                    },
                    {
                        name: '精华',
                        value: 5999
                    },
                    {
                        name: '眼霜',
                        value: 1500
                    },
                    {
                        name: '口红',
                        value: 1999
                    },
                    {
                        name: '面霜',
                        value: 2200
                    },
                    {
                        name: '爽肤水',
                        value: 4500
                    }
                ],
                // 柱状图
                userData: [
                    {
                        data: '周一',
                        new: 5,
                        active: 200
                    },
                    {
                        data: '周二',
                        new: 10,
                        active: 500
                    },
                    {
                        data: '周三',
                        new: 12,
                        active: 550
                    },
                    {
                        data: '周四',
                        new: 60,
                        active: 800
                    },
                    {
                        data: '周五',
                        new: 65,
                        active: 550
                    },
                    {
                        data: '周六',
                        new: 53,
                        active: 770
                    },
                    {
                        data: '周日',
                        new: 33,
                        active: 170
                    }
                ],
                // 折线图
                orderData: {
                    date: ['20220601','20220602','20220603','20220604','20220605','20220606','20220607'],
                    data: List
                },
                tableData: [
                    {
                        name: "面膜",
                        todayBuy: 100,
                        monthBuy: 300,
                        totalBuy: 800,
                      },
                      {
                        name: "精华",
                        todayBuy: 100,
                        monthBuy: 300,
                        totalBuy: 800,
                      },
                      {
                        name: "眼霜",
                        todayBuy: 100,
                        monthBuy: 300,
                        totalBuy: 800,
                      },
                      {
                        name: "口红",
                        todayBuy: 100,
                        monthBuy: 300,
                        totalBuy: 800,
                      },
                      {
                        name: "面霜",
                        todayBuy: 100,
                        monthBuy: 300,
                        totalBuy: 800,
                      },
                      {
                        name: "爽肤水",
                        todayBuy: 100,
                        monthBuy: 300,
                        totalBuy: 800,
                      }
                ]
            }
        }
    }
}